package com.nosnow.edu.invoking;

import com.nosnow.edu.invoking.impl.OrdersClientImpl;
import com.nosnow.edu.invoking.impl.VodClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author by bingHeng
 * @version 1.0
 * @Create 2020/5/31 18:59
 */

@FeignClient(name = "service-order", fallback = OrdersClientImpl.class)
@Component
public interface OrdersClient {

    // 远程调用订单模块，根据订单Id和用户Id查询该课程是否已经购买过
    @GetMapping("/web/order/isBuyCourse/{courseId}/{memberId}")
    public boolean isBuyCourse(@PathVariable("courseId") String courseId, @PathVariable("memberId") String memberId);
}
